<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<body>
	<h:form>
		<p:commandLink  ajax="false"
			action="/view.xhtml?javax.portlet.faces.PortletMode=view&amp;javax.portlet.faces.WindowState=normal" 
			>
			<p:graphicImage value="/images/Home-Button.png" />
			</p:commandLink>		
		<p:graphicImage value="/images/flags/#{myBean.selectedCountry}.png"
			style="text-align:center;width:30px;height:30px;" />
	</h:form>
	<h:form>
		<p:dataTable var="patient" value="#{myBean.patients}">
			<p:column>
				<f:facet name="header">
					<h:outputText value="Surname" />
				</f:facet>
				<h:outputText value="#{patient.familyName}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Name" />
				</f:facet>
				<h:outputText value="#{patient.name}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Birth date" />
				</f:facet>
				<h:outputText value="#{patient.birthDate}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Address" />
				</f:facet>
				<h:outputText value="#{patient.address}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Zip code" />
				</f:facet>
				<h:outputText value="#{patient.postalCode}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="City" />
				</f:facet>
				<h:outputText value="#{patient.city}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Country" />
				</f:facet>
				<h:outputText value="#{patient.country}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Actions" />
				</f:facet>	
				<p:commandButton
					action="/viewDocuments.xhtml?javax.portlet.faces.PortletMode=view&amp;javax.portlet.faces.WindowState=normal"
					ajax="false" icon="ui-icon-search"
					title="View Patient Summary Documents">
					<f:setPropertyActionListener value="#{patient}"
						target="#{myBean.selectedPatient}" />
				</p:commandButton>
				<!-- <p:commandButton id="modalDialogButton3"
					onclick="patientDocuments.show();" icon="ui-icon-disk"
					title="View Patient Summary Documents" >
					<f:setPropertyActionListener value="#{patient}"
							target="#{myBean.selectedPatient}" 							
							 />
						</p:commandButton>	 
						 -->				
			</p:column>
		</p:dataTable>	
	</h:form>
</body>
</html>